<?php


namespace app\admin\controller;

/**
 * 待认证学分控制器（学生端）
 */
class Credit extends AdminBase
{
    
   
    /**
     * 新学分申请
     */
    public function creditAdd()
    {
        
        IS_POST && $this->jump($this->logicCredit->creditEdit($this->param));
        
        return $this->fetch('credit_edit');
    }
    
     /**
     * 待认证列表
     */
    public function creditList()
    {
        
        $this->assign('list', $this->logicCredit->getCreditList());
        
        return $this->fetch('credit_list');
    }
    
    /**
     * 申请学分 编辑
     */
    public function creditEdit()
    {
        
        IS_POST && $this->jump($this->logicCredit->creditEdit($this->param));
        
        $info = $this->logicCredit->getCreditInfo(['id' => $this->param['id']]);
        
        $this->assign('info', $info);
        
        return $this->fetch('credit_edit');
    }
    
    /**
     *删除待认证学分
     */
    public function creditDel($id = 0)
    {
        
        $this->jump($this->logicCredit->creditDel(['id' => $id]));
    }

     /**
     * 未审核学分列表
     */
    public function unauditList()
    {
        
        $this->assign('list', $this->logicCredit->getCreditList());
        
        return $this->fetch('credit_list');
    }
}
